lst = [23, 445, 2, -13, 566, 3333, 12]
n = len(lst)
for i in range(n):
    max_index = i
    for j in range(i+1, n):
        if lst[j] > lst[max_index]:  # 倒序
            max_index = j
    lst[i], lst[max_index] = lst[max_index], lst[i]
print(lst)
